import type { AppRouteModule } from '/@/router/types';

import { LAYOUT } from '/@/router/constant';
// import { t } from '/@/hooks/web/useI18n';

import { RoleEnum } from '/@/enums/roleEnum';

const route: AppRouteModule = {
  path: '/coreKpis',
  name: 'CoreKpis',
  component: LAYOUT,
  redirect: '/coreKpis/dataSource',
  meta: {
    orderNo: 1002000,
    icon: 'gravity-ui:face-robot',
    title: '指标计算',
    roles: [RoleEnum.coreHide],
  },
  children: [
    {
      path: 'dataSource',
      name: 'DataSource',
      component: () => import('/@/views/cn/core/kpis/DataSource.vue'),
      meta: {
        title: '数据源',
        ignoreKeepAlive: true,
        // roles: [RoleEnum.coreDict],
      },
    },
    {
      path: 'sqlStr',
      name: 'SqlStr',
      component: () => import('/@/views/cn/core/kpis/SqlStr.vue'),
      meta: {
        title: 'sql语句',
        ignoreKeepAlive: true,
        // roles: [RoleEnum.coreDict],
      },
    },
    {
      path: 'expression',
      name: 'Expression',
      component: () => import('/@/views/cn/core/kpis/Expression.vue'),
      meta: {
        title: '计算公式',
        ignoreKeepAlive: true,
        // roles: [RoleEnum.coreDict],
      },
    },
    {
      path: 'expressionParam',
      name: 'ExpressionParam',
      component: () => import('/@/views/cn/core/kpis/ExpressionParam.vue'),
      meta: {
        title: '公式参数',
        ignoreKeepAlive: true,
        // roles: [RoleEnum.coreDict],
      },
    },
    {
      path: 'expressionOutput',
      name: 'ExpressionOutput',
      component: () => import('/@/views/cn/core/kpis/ExpressionOutput.vue'),
      meta: {
        title: '公式输出',
        ignoreKeepAlive: true,
        // roles: [RoleEnum.coreDict],
      },
    },
    {
      path: 'computeTask',
      name: 'ComputeTask',
      component: () => import('/@/views/cn/core/kpis/ComputeTask.vue'),
      meta: {
        title: '计算任务',
        ignoreKeepAlive: true,
        // roles: [RoleEnum.coreDict],
      },
    },
    {
      path: 'taskParam',
      name: 'TaskParam',
      component: () => import('/@/views/cn/core/kpis/TaskParam.vue'),
      meta: {
        title: '任务参数',
        ignoreKeepAlive: true,
        // roles: [RoleEnum.coreDict],
      },
    },
    {
      path: 'taskExpression',
      name: 'TaskExpression',
      component: () => import('/@/views/cn/core/kpis/TaskExpression.vue'),
      meta: {
        title: '任务公式',
        ignoreKeepAlive: true,
        // roles: [RoleEnum.coreDict],
      },
    },
    {
      path: 'taskExpressionParam',
      name: 'TaskExpressionParam',
      component: () => import('/@/views/cn/core/kpis/TaskExpressionParam.vue'),
      meta: {
        title: '任务公式参数',
        ignoreKeepAlive: true,
        // roles: [RoleEnum.coreDict],
      },
    },
    {
      path: 'taskExpressionSqlParam',
      name: 'TaskExpressionSqlParam',
      component: () => import('/@/views/cn/core/kpis/TaskExpressionSqlParam.vue'),
      meta: {
        title: '任务公式sql参数',
        ignoreKeepAlive: true,
        // roles: [RoleEnum.coreDict],
      },
    },
  ],
};

export default route;
